{include file="header.tpl"}

   <h1>Projects</h1>

   {include file="admin_sidebar.tpl"}

   <div id="content">
   
      {include file="flashes.tpl"}

      <div class="action_bar">
         <a class="add" href="?url=projects/edit/">Add Project</a>
      </div>
      
      <table rules="all" frame="box">
         <thead>
            <tr>
               <th>Description</th>
               <th class="center">Active</th>
               <th class="center">Components</th>
               <th class="center">Milestones</th>
               <th class="center">Tickets</th>
               <th class="center">Edit</th>
               <th class="center">Delete</th>
            </tr>
         </thead>
         <tbody>
            {foreach item=project from=$projects}
            <tr class="{cycle values=",alt"}">
               <td>{$project.description}</td>
               <td class="center"><img src="img/{if $project.active}tick{else}cross{/if}.png" alt="" /></td>
               <td class="center">{$project.component_count}</td>
               <td class="center">{$project.milestone_count}</td>
               <td class="center">{$project.ticket_count}</td>
               <td class="edit"><a href="?url=projects/edit/{$project.id}"></a></td>
               <td class="delete"><a href="javascript:spf.navigate('projects', 'delete', '{$project.id}', 'Are you sure?')"></a></td>
            </tr>
            {/foreach}
            {if !$projects}<tr><td class="norecords" colspan="10">No records found.</td></tr>{/if}
         </tbody>
      </table>
      <div class="clear"></div>
      
   </div>
   
{include file="footer.tpl"}
